<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 500px;
            height: 500px;
            border: 2px solid salmon;
            /* 将背景图片定位 */
            /* background: url(./icons/fendi.png) no-repeat; */
            /* 错误的:background-image: url(./icons/huazhuangshui.png) no-repeat; */
            /* background-position:x轴 y轴 */
            /* background-position:10px 20px; */
            /* background-position-x: 10px;
            background-position-y: 100px; */
            /* 添加背景图并定位 */
            /* background: url(./icons/fendi.png) no-repeat 10px 20px; */
            background: url(./icons/fendi.png) no-repeat center center;
        }
    </style>
</head>

<body>
    <div class="box"></div>

</body>

</html>